import * as React from 'react';
import StackView, { IStackViewItem, initStackViews } from '../../component/common/StackView';


export interface IWorkViewProps {
    isActive: boolean;
}

export interface IWorkViewState {
}

export default class WorkViewComponent<P extends IWorkViewProps, S extends IWorkViewState> extends React.Component<P, S>{

    constructor(props: P) {
        super(props)
    }
    /** return the child page */
    providerPages?(): any[];
    /** return the root page */
    providerRootView?(): any;

    render() {
        const {isActive} = this.props;
        const rootView: IStackViewItem[] = initStackViews(this.providerPages(), this.providerRootView());
        return (<StackView rootView={rootView} isActive={isActive} />);
    }
}
